package com.cskaoyan.service;

import com.cskaoyan.bean.MarketGoodsAttribute;
import com.cskaoyan.mapper.MarketGoodsAttributeMapper;
import com.cskaoyan.util.TransactionUtil;

import java.util.Date;

/**
 * @author stone
 * @date 2023/03/20 09:47
 */
public class GoodsAttributeServiceImpl implements GoodsAttributeService {
    @Override
    public int add(MarketGoodsAttribute attribute) {
        MarketGoodsAttributeMapper goodsAttributeMapper = TransactionUtil.getMapper(MarketGoodsAttributeMapper.class);
        Date now = new Date();
        attribute.setAddTime(now);
        attribute.setUpdateTime(now);

        return goodsAttributeMapper.insertSelective(attribute);
    }
}
